#ifndef __lws_protocol_h__
#define __lws_protocol_h__

#include <libwebsockets.h>

/* one of these is created for each client connecting to us */

struct per_session_data__minimal {
	struct per_session_data__minimal *pss_list;
	struct lws *wsi;
	int last; /* the last message number we sent */
};


/* one of these created for each message */

struct msg {
	void *payload; /* is malloc'd */
	size_t len;
};


/* one of these is created for each vhost our protocol is used with */

struct per_vhost_data__minimal {
	struct lws_context *context;
	struct lws_vhost *vhost;
	const struct lws_protocols *protocol;

	struct per_session_data__minimal *pss_list; /* linked-list of live pss*/

	struct msg amsg; /* the one pending message... */
	int current; /* the current message number we are caching */
};

struct vhd__dumb_increment {
	const unsigned int *options;
};


#endif